<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/5/25
  Time: 10:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Air</title>
</head>
<form action="../test/findAll">
    <table border="1px red solid" cellpadding="0" cellspacing="0">
        <th>空气质量检测信息库</th>
        按地区查询: <select name="district" class="district">
        <option value="0">不限</option>
        <c:forEach var="direct" items="${directList}">
            <option value="${direct.id}" <c:if test="${direct.id == district}">selected</c:if> > ${direct.name} </option>
        </c:forEach>
    </select>
        <input type="submit" value="查询"/>
        <a href="../test/findType">添加空气质量信息</a><br>
        <tr>
            <td>序号</td>
            <td>区域</td>
            <td>检测时间</td>
            <td>PM10数据</td>
            <td>PM2.5数据</td>
            <td>监测站</td>
        </tr>
        <c:forEach items="${pageInfo.list}" var="air">
            <tr>
                <td>${air.id}</td>
               <a href="../test/findId&id=" + ${air.id}> <td>${air.districtName}</td> </a>
                <td>${air.monitorTime}</td>
                <td>${air.pm10}</td>
                <td>${air.pm25}</td>
                <td>${air.monitoringStation}</td>
            </tr>
        </c:forEach>
    </table>
    <a href="../test/findAll?pageIndex=1&district=" + ${district}>首页</a><br>
    <a href="../test/findAll?pageIndex=${pageInfo.prePage}&district=${district}">上一页</a><br>
    <a href="../test/findAll?pageIndex=${pageInfo.nextPage}&district=${district}">下一页</a><br>
    <a href="../test/findAll?pageIndex=${pageInfo.lastPage}&district=${district}">尾页</a><br>
    第 ${pageInfo.pageNum} 页 / 共 ${pageInfo.pages} (${pageInfo.total}条)
</form>


</body>

</html>
